package com.indusfo.spc.mapper;



import com.indusfo.spc.pojo.ProList;
import com.indusfo.spc.pojo.Station;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author louk
 * @date 2019/9/11 11:48
 */
public interface ProListMapper{

    List<ProList> queryProList(ProList proList);

    int deleteProList(@Param("proId") Integer proId, @Param("staIds") Integer[] staIds, @Param("dataState") Integer dataState);

    int insertProList(@Param("proId") Integer proId, @Param("staIds") Integer[] staIds, @Param("dataState") Integer dataState);

    int countProList(ProList proList);

    List<Station> queryStationByProList(ProList proList);


    List<Station>  queryStationBydisSta(@Param("pagesize") Integer pagesize, @Param("pageindex") Integer pageindex, @Param("lN") Integer lN, @Param("proId") Integer proId,
                                        @Param("workshopId") Integer workshopId, @Param("productionLineId") Integer productionLineId, @Param("sessionStaIds") Integer[] staIds);



    int  countStationBydisSta(@Param("proId") Integer proId, @Param("workshopId") Integer workshopId, @Param("productionLineId") Integer productionLineId, @Param("sessionStaIds") Integer[] staIds);


    List<ProList> queryByProId(Integer proId);

    int deleteProListByProIds(@Param("proIds") Long[] proIds);

    int updateProListByWorkshopId(@Param("workshopIds") Integer[] workshopIds, @Param("dataState") Integer dataState);

    int updateProListByProductionLineId(@Param("productLineIds") Long[] productLineIds, @Param("dataState") Integer dataState);

    int updateProListByStaId(@Param("staIds") Integer[] staIds, @Param("dataState") Integer dataState);

}
